<template>
	<view :style="themeColor">
		<view class="page">
			<view class="flex benben-position-layout flex flex-wrap align-center dynamicDetails_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-center justify-between flex-sub dynamicDetails_fd0_0'>
					<view class='flex flex-wrap align-center dynamicDetails_fd0_0_c0' @tap.stop="handleJumpDiy"
						data-type="back" data-url="1">
						<text class='fu-iconfont2  dynamicDetails_fd0_0_c0_c0'>&#xE794;</text>
					</view>
					<view class='flex flex-wrap align-stretch justify-center'>
						<text class='dynamicDetails_fd0_0_c1_c0'>详情</text>
					</view>
					<view class='flex flex-wrap align-center justify-end dynamicDetails_fd0_0_c0'>
						<image class='dynamicDetails_fd0_0_c2_c0' mode="aspectFit" :src='STATIC_URL+"72.png"'
							@tap.stop="$refs.benbenPositionPopup1695796158643.open($event)"></image>
					</view>
				</view>
			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<benben-position-popup ref="benbenPositionPopup1695796158643" :width="158" :height="97" :mask-hide='false'
				popup-origin="right top">
				<view class='flex align-center justify-center benben-flex-position-popup flex dynamicDetails_popup_1'>
					<image class='dynamicDetails_positionPopup1_c0' mode="aspectFit" :src='STATIC_URL+"74.png"'
						v-if="type=='1'"></image>
					<image class='dynamicDetails_positionPopup1_c0' mode="aspectFit" :src='STATIC_URL+"74.png"'
						v-if="type=='2'"></image>
					<text class='dynamicDetails_positionPopup1_c1' v-if="type=='1'" @tap.stop="handleJumpDiy"
						data-type="navigateTo" :data-url="`/pages/mine/reportComments/reportComments`">举报</text>
					<text class='dynamicDetails_positionPopup1_c1' v-if="type=='2'" @tap.stop="clickDelete">删除</text>
				</view>
			</benben-position-popup>
			<!---flex布局flex布局开始-->
			<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout dynamicDetails_flex_2">
				<view class='flex flex-direction flex-wrap align-stretch'>
					<view class='flex flex-wrap align-center dynamicDetails_fd2_0_c0'>
						<image class='dynamicDetails_fd2_0_c0_c0' mode="aspectFit"
							:src="userInfo.avatar"></image>
						<view class='flex flex-direction flex-wrap align-start'>
							<text class='dynamicDetails_fd2_0_c0_c1_c0'>{{detailsMsg.user_nickname}}</text>
							<view class='flex flex-wrap align-center'>
								<text class='dynamicDetails_fd2_0_c0_c1_c1_c0'>{{detailsMsg.createtime}}</text>
								<!-- <text class='dynamicDetails_fd2_0_c0_c1_c1_c0'>分钟前</text> -->
							</view>
						</view>
					</view>
					<text class='dynamicDetails_fd2_0_c1'>{{detailsMsg.xiangqingmiaoshu}}</text>
					<view class='flex flex-wrap align-center dynamicDetails_fd2_0_c2'>
						<image class='dynamicDetails_fd2_0_c2_c0' mode="aspectFill"
							v-for="(item,index) in detailsMsg.tupian" :key="index" :src="item?item:STATIC_URL+'18.png'"
							@tap.stop="singleImagePreview(item)">
						</image>
					</view>
				</view>
				<view class='flex flex-direction flex-wrap align-stretch dynamicDetails_fd2_1'
					v-if="showType == 2 || showType == 6">
					<view class='flex flex-wrap align-center justify-between flex-sub dynamicDetails_fd2_1_c0' @tap.stop="gotoPhone">
						<view class='flex flex-wrap align-center'>
							<text>联系人-</text>
							<text>张怀民</text>
							<image class='dynamicDetails_fd2_1_c0_c0_c2' mode="aspectFit" :src='STATIC_URL+"75.png"'>
							</image>
						</view>
						<view class='flex flex-wrap align-center'>
							<text>联系电话-</text>
							<text>{{detailsMsg.user_mobile}}</text>
							<image class='dynamicDetails_fd2_1_c0_c1_c2' mode="aspectFit" :src='STATIC_URL+"76.png"'>
							</image>
						</view>
					</view>
				</view>
			</view>
			<!---flex布局flex布局结束-->
		</view>
	</view>
</template>
<script>
	export default {
		components: {},
		data() {
			return {
				"type": "1",
				id: "",
				detailsMsg: {},
				showType: '',
				phoneSet: '17612341234',
				aid:'',
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},
			userInfo(){
				return this.$store.getters.userInfo
			}
		},
		watch: {},
		onLoad(options) {
			let {
				type,
				id,
				showType,
				aid
			} = options
			if (type !== undefined) this.type = type
			if (id !== undefined) this.id = id
			if (showType !== undefined) this.showType = showType
			if (aid !== undefined) this.aid = aid
			this.getDetails()
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			clickDelete(){
				let that = this
				that.$refs.benbenPositionPopup1695796158643.close()
				uni.showModal({
					title: '删除',
					content: '是否删除',
					confirmText: '确认',
					success(res) {
						if (res.confirm) {
							that.$api.post('/m6752/666cf061db757',{
								aid:that.detailsMsg.aid
							}).then(res=>{
								if(res.data.code == 1){
									that.$message.info('删除成功')
									uni.navigateBack(1)
								}else{
									that.$message.info(res.data.msg)
								}
							})
						}
					}
				})
			},
			gotoPhone() {
				uni.showModal({
					title: '拨打电话',
					content: this.detailsMsg.user_mobile,
					confirmText: '确认',
					success(res) {
						if (res.confirm) {
							uni.makePhoneCall({
								phoneNumber: this.phoneSet, //电话号码
								success: function(e) {
									console.log(e);
								},
								fail: function(e) {
									console.log(e);
								}
							})
						}
					}
				})
			},
			getDetails() {
				uni.showLoading({
					title: '加载中'
				})
				this.$api.post('/m6752/666c110cc5300', {
					aid: this.aid
				}).then(res => {
					uni.hideLoading()
					if (res.data.code == 1) {
						this.detailsMsg = res.data.data[0]
					}
				})
			}
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: var(--benbenbgColor1);
		background-size: 100% auto;
	}

	.dynamicDetails_flex_0 {
		background: #fff;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.dynamicDetails_fd0_0_c2_c0 {
		width: 40rpx;
		height: 40rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}

	.dynamicDetails_fd0_0_c1_c0 {
		font-size: 36rpx;
		font-weight: 500;
		color: #333333;
	}

	.dynamicDetails_fd0_0_c0_c0 {
		font-size: 36rpx;
		color: #333;
	}

	.dynamicDetails_fd0_0_c0 {
		width: 120rpx;
	}

	.dynamicDetails_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
	}

	.dynamicDetails_popup_1 {
		background: url(/static/images/73.png) no-repeat;
		border-radius: 8rpx 8rpx 8rpx 8rpx;
		width: 158rpx;
		height: 97rpx;
		background-size: 100% auto !important;
	}

	.dynamicDetails_positionPopup1_c1 {
		color: #FFFFFF;
		font-size: 28rpx;
		font-weight: 400;
		line-height: 28rpx;
	}

	.dynamicDetails_positionPopup1_c0 {
		width: 32rpx;
		height: 32rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		margin: 0rpx 10rpx 0rpx 0rpx;
	}

	.dynamicDetails_flex_2 {
		padding: 32rpx 32rpx 0rpx 32rpx;
	}

	.dynamicDetails_fd2_1_c0_c1_c2 {
		width: 32rpx;
		height: 32rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		margin: 0rpx 0rpx 0rpx 16rpx;
	}

	.dynamicDetails_fd2_1_c0_c0_c2 {
		width: 28rpx;
		height: 28rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		margin: 0rpx 0rpx 0rpx 16rpx;
	}

	.dynamicDetails_fd2_1_c0 {
		background: var(--benbenbgColor1);
		background-size: 100% auto;
		padding: 0rpx 32rpx 0rpx 32rpx;
	}

	.dynamicDetails_fd2_1 {
		background: var(--benbenbgColor0);
		margin: 0rpx -32rpx 0rpx -32rpx;
		width: 750rpx;
		height: 128rpx;
		position: fixed;
		bottom: calc(0rpx + var(--window-bottom));
		background-size: 100% auto;
		padding: 20rpx 0rpx 0rpx 0rpx;
	}

	.dynamicDetails_fd2_0_c2_c0 {
		width: 216rpx;
		height: 216rpx;
		margin: 0rpx 19rpx 20rpx 0rpx;
		border-radius: 16rpx;
	}

	.dynamicDetails_fd2_0_c2 {
		margin: 0rpx -19rpx 0rpx 0rpx;
	}

	.dynamicDetails_fd2_0_c1 {
		color: #333333;
		font-size: 28rpx;
		font-weight: 400;
		line-height: 48rpx;
		margin: 0rpx 0rpx 24rpx 0rpx;
	}

	.dynamicDetails_fd2_0_c0_c1_c1_c0 {
		color: #999999;
		font-size: 24rpx;
		font-weight: 400;
		margin: 12rpx 0rpx 0rpx 0rpx;
	}

	.dynamicDetails_fd2_0_c0_c1_c0 {
		color: #333333;
		font-size: 28rpx;
		font-weight: 500;
	}

	.dynamicDetails_fd2_0_c0_c0 {
		width: 88rpx;
		height: 88rpx;
		border-radius: 50%;
		margin: 0rpx 24rpx 0rpx 0rpx;
	}

	.dynamicDetails_fd2_0_c0 {
		margin: 0rpx 0rpx 24rpx 0rpx;
	}
</style>